import _Siema  from './siema.common';

window.__Siema = _Siema;

(function () {
    let template = function (self) {
        self.$uid = "slider_" + Math.random().toString(36).substring(7);
        return `<div slider-id="${self.$uid}">${self.innerHTML}</div>  `;
    };
    
    document.auiDefineElement("aux-slider", {
        template,
        props: {
          
        },
        created: function(self) {
            self.$ele.root = self.children[0];
            self.$control = new _Siema({    
                selector: `[slider-id="${self.$uid}"]`
            });
            self.next = function() {
                self.$control.next();
            }
        }
    });
})();